/****************************************
 * 2018 - 2021 版权所有 CopyRight(c) 快程乐码信息科技有限公司所有, 未经授权，不得复制、转发
 */

package com.kclm.security03.modules.common.exception;

import lombok.extern.slf4j.Slf4j;

/******************
 * @Author yejf
 * @Version v1.0
 * @Create 2020-07-26 22:30
 * @Description TODO
 */
@Slf4j
public class MyException extends RuntimeException {

    /**
     * 异常状态码
     */
    private Integer code;

    public MyException(Throwable cause) {
        super(cause);
        log.debug("以cause来创建MyException实例");
    }

    public MyException(String message) {
        super(message);
    }

    public MyException(Integer code, String message) {
        super(message);
        this.code = code;
        log.debug("以code和message 来创建MyException实例");
    }

    public MyException(String message, Throwable cause) {
        super(message, cause);
    }

    public Integer getCode() {
        return code;
    }

}
